<HTML>
<HEAD>
<TITLE>
<?php
echo "FootPrint Script";
?>
</TITLE>
</HEAD>
<BODY>
<H1>
First PHP page
</H1>
<HR>
<?php
// Single line C++ style comment
/*
printing the message

$file = fopen("data.xml","a+");
fwrite($file,"<footprint>\n");
fwrite($file,"	<tag>");
fwrite($file,$_POST['Tag']);
fwrite($file,"</tag>\n");
fwrite($file,"	<value>");
fwrite($file,$_POST['Value']);
fwrite($file,"</value>\n");
fwrite($file,"	<domarray>");
fwrite($file,$_POST['DomArray']);
fwrite($file,"</domarray>\n");
fwrite($file,"	<operation>");
fwrite($file,$_POST['Operation']);
fwrite($file,"</operation>\n");
fwrite($file,"	<text>");
fwrite($file,$_POST['Text']);
fwrite($file,"</text>\n");
fwrite($file,"</footprint>\n");
fclose($file); 
echo "<p>"+$_POST['Tag']+"</p>";
*/
$scriptname= $_POST['ScriptName'];
$uid= $_POST['Uid'];
$scriptid=$_POST['ScriptID'];
$xml = simplexml_load_file("./".$uid."/".$scriptid."/data.xml");

$footprint=$xml->addChild("footprint");
$footprint->addChild("tag",$_POST['Tag'] );
$footprint->addChild("value",$_POST['Value'] );
$footprint->addChild("url",$_POST['Url'] );
$footprint->addChild("newtab",$_POST['NewTab'] );
$footprint->addChild("domarray",$_POST['DomArray'] );
$footprint->addChild("operation",$_POST['Operation'] );
$footprint->addChild("text",$_POST['Text']);
$xml->asXML("./".$uid."/".$scriptid."/data.xml");


# Unix style single line comment
?>
</BODY>
</HTML>